﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
using System.Threading.Tasks;

namespace SyncChatServer
{
    class User
    {
        public TcpClient tcpClient { get; private set; }
        public BinaryReader br { get; private set; }
        public BinaryWriter bw { get; private set; }
        public string userName { get;  set; }
        public User(TcpClient tcpClient)
        {
            this.tcpClient = tcpClient;
            NetworkStream networkStream = tcpClient.GetStream();
            br = new BinaryReader(networkStream);
            bw = new BinaryWriter(networkStream);
        }
        public void Close()
        {
            br.Close();
            bw.Close();
            tcpClient.Close();
        }
    }
}
